﻿<%@  Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<cludg.Web.ViewModels.AccountModel>" %>
<%@ Import Namespace="cludg.Web.Core.RenderHelpers" %>
<%@ Import Namespace="cludg.Web.Core.Utils" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Редактирование профиля
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="SecondLevelMenu" runat="server">
	<%: Html.Menu(Model.EditUserMenu)%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
	<h2>Аккаунт</h2>
	<% Html.EnableClientValidation(); %>
	<% using (Html.BeginForm("EditAccount", "Account"))
	{%>
	<%: Html.ValidationSummary(true) %>
	<fieldset>
		<div class="editor-label">
			<%: Html.LabelFor(model => model.Email) %>
		</div>
		<div class="editor-field">
			<%: Html.TextBoxFor(model => model.Email, ViewRenderUtil.DisabledAttributes(Model.NotEditable))%>
			<%: Html.ValidationMessageFor(model => model.Email) %>
		</div>
		<div class="editor-label">
			<%: Html.LabelFor(model => model.NewPassword) %>
		</div>
		<div class="editor-field">
			<%: Html.PasswordFor(model => model.NewPassword, ViewRenderUtil.DisabledAttributes(Model.NotEditable))%>
			<%: Html.ValidationMessageFor(model => model.NewPassword)%>
		</div>
		<div class="editor-label">
			<%: Html.LabelFor(model => model.NewPasswordConfirm) %>
		</div>
		<div class="editor-field">
			<%: Html.PasswordFor(model => model.NewPasswordConfirm, ViewRenderUtil.DisabledAttributes(Model.NotEditable))%>
			<%: Html.ValidationMessageFor(model => model.NewPasswordConfirm)%>
		</div>
		<div class="editor-label">
			<%: Html.LabelFor(model => model.CurrentPassword)%>
		</div>
		<div class="editor-field">
			<%: Html.PasswordFor(model => model.CurrentPassword, ViewRenderUtil.DisabledAttributes(Model.NotEditable))%>
			<%: Html.ValidationMessageFor(model => model.CurrentPassword)%>
		</div>
		<p>
			<input type="submit" <%: Html.Disabled(Model.NotEditable) %> value="сохранить" />
		</p>
	</fieldset>
	<% } %>
</asp:Content>
